<!DOCTYPE html>
<html lang="en" xmlns:th="https://thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
index
<a th:href="@{/test/1/aaa}">访问rest方式</a><br>
<a th:href="@{/test?id=1&name=aaa}">访问servlet方式</a><br>
<a th:href="@{/test(id=2,name='你好')}">访问servlet方式2</a><br>
<a th:href="@{/test2(id=2,name='你好')}">控制器形参</a><br>
<form th:action="@{/testuser}" method="post">
    用户名:<input type="text" name="username"><br>
    密码:<input type="password" name="password"><br>
    方向:<input type="checkbox" name=lesson value="Java">Java
        <input type="checkbox" name=lesson value="C++">C++
        <input type="checkbox" name=lesson value="C">C <br>
    <input type="submit" value="使用形参获取参数">
</form>
</body>
</html>